import { ref, onMounted } from "vue";

// 地图
const map = ref();
const mrkerList = ref([]);
const markerClusterer = ref();

// 初始化地图
const initMap = () => {
  console.log(222);
  var T = window.T;
  map.value = new T.Map("map");
  map.value.centerAndZoom(new T.LngLat(119.46823, 33.23982), 11);
  var ctrl = new T.Control.MapType({ position: T_ANCHOR_BOTTOM_RIGHT });
  map.value.addControl(ctrl);
  map.value.setMapType(TMAP_HYBRID_MAP);
  // map.value.addEventListener("click", function(e){
  //   console.log(e.lnglat.getLng()+','+e.lnglat.getLat());
  // });
  // drawProvince();
};

onMounted(() => {
  console.log(111);
  initMap();
});
